/*
 * comlan
 */

package com.promfy.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class DateFormatUtil {
	
	/**
	 * can get current date.
	 * Calender is right for timezone
	 * Date will cause 8 hours plus .
	 * @return
	 */
	public static String getCurrDate() {
		Calendar c = Calendar.getInstance();
		Date date = c.getTime();
		SimpleDateFormat sdf = new SimpleDateFormat("MM/dd HH:mm:ss");
		String dStr = sdf.format(date);
		return dStr;
	}

	public static String getTitle(){
		Calendar c = Calendar.getInstance();
		Date date = c.getTime();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd E HH:mm:ss");
		String dStr = sdf.format(date);
		return dStr;
	}
	public static String getWeek(){
		Calendar c = Calendar.getInstance();
		
		return c.get(Calendar.WEEK_OF_YEAR)+"";
	}

	public static String formatDate(long time) {
		SimpleDateFormat sdf = new SimpleDateFormat("MM/dd E HH:mm:ss");
		String dStr = sdf.format(time);
		return dStr;
	}
}
